package com.gxa.mapper;

import com.gxa.domain.entity.ProductInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ProductInfoMapper {
    ProductInfo selectByBarcodeNo(@Param("barcodeNo") String barcodeNo);

    int updateStockByBarcodeNo(@Param("barcodeNo") String barcodeNo, @Param("quantity") Integer quantity);

    @Select("SELECT * FROM product_info")
    List<ProductInfo> selectAll();
} 